package com.wchen.project.web.ticket;

import com.wchen.project.ticket.service.ITicketService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019/2/2 15:29
 */
@Slf4j
@Component
public class TicketController {
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ITicketService ticketService;
    @Scheduled(cron = "0 /1 * * * ?")
    public void getTicket(){
        ticketService.getTicketAndSendMail();
    }
}
